package com.jeeplus.test.jlnu.fieldConfig.mapper;

import com.jeeplus.test.jlnu.fieldConfig.domain.FieldConfigEntity;
import com.jeeplus.test.jlnu.qualificationInfo.domain.entity.QualificationInfo;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Select;

import java.util.List;

@Mapper
public interface QualificationFieldConfigMapper {

    List<FieldConfigEntity> getAllFieldConfigs();

    void updateFieldConfig(String fieldKey, String fieldName);
    @Select("select count(*) from jlnu_admission_info where student_id = #{studentId}")
    int checkStudentId(String studentId);
    @Insert("INSERT INTO jlnu_qualification_info (native_place, degree_certificate_num, degree_certificate_date, officer_id_num, discipline_major, degree_type, study_start_time, study_end_time, document_title, document_date, student_id) " +
            "VALUES (#{nativePlace}, #{degreeCertificateNum}, #{degreeCertificateDate}, #{officerIdNum}, #{disciplineMajor}, #{degreeType}, #{studyStartTime}, #{studyEndTime}, #{documentTitle}, #{documentDate}, #{studentId})")
    int saveQualification(QualificationInfo info);


}
